# Maintainer: AndyRTR <andyrtr@archlinux.org>
# Maintainer: Jan de Groot <jgc@archlinux.org>

pkgname=luit
pkgver=20230201
pkgrel=1
pkgdesc="Filter that can be run between an arbitrary application and a UTF-8 terminal emulator"
arch=('x86_64')
url="https://invisible-island.net/luit/luit.html"
license=('custom')
depends=('libfontenc')
makedepends=('libx11')
replaces=('xorg-luit')
conflicts=('xorg-luit')
source=(https://invisible-mirror.net/archives/${pkgname}/${pkgname}-${pkgver}.tgz{,.asc})
sha256sums=('ee2a8d1dbc7ee23d00c412a1f0b3d70678514d56d5be0a816dd95e232e76c56f'
            'SKIP')
validpgpkeys=('C52048C0C0748FEE227D47A2702353E0F7E48EDB'
              '19882D92DDA4C400C22C0D56CC2AF4472167BE03') # "Thomas Dickey <dickey@invisible-island.net>"

build() {
  cd luit-${pkgver}
  ./configure --prefix=/usr --enable-fontenc
  make
}

package() {
  cd luit-${pkgver}
  make DESTDIR="${pkgdir}" install
  install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
  install -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/"
}
